package myWebApp;

/*第三章 垃圾收集器
 *测试需要知识点:通过设置-XX:MAXTenuringThreshold=15参数
 *空间分配担保
 *jvm 参数:-verbose:gc -Xms200M -Xmx200M -Xmn100M -XX:+PrintGCDetails -XX:SurvivorRatio=8 -XX:+UseSerialGC -XX:MaxTenuringThreshold=15
 *2017年8月7日15:05:27
 */
public class GC8 {

	public static void main(String[] args) {
		byte[] allocation1,allocation2,allocation3,allocation4,allocation5;
		/*这样survivor中的大小大于一半*/
		allocation1 = new byte[1024*1024*3];
		
		allocation2 = new byte[1024*1024*40];
		allocation3 = new byte[1024*1024*40];
		allocation4 = new byte[1024*1024*40];
	}
}

/*注意信息:
 * [GC (Allocation Failure) [DefNew: 50381K->6739K(92160K), 0.0169715 secs] 50381K->47699K(194560K), 0.0170150 secs] [Times: user=0.00 sys=0.02, real=0.02 secs] 
	[GC (Allocation Failure) [DefNew: 47699K->0K(92160K), 0.0174927 secs] 88659K->88659K(194560K), 0.0175136 secs] [Times: user=0.00 sys=0.02, real=0.02 secs] 
	Heap
	 def new generation   total 92160K, used 41779K [0x00000000f3800000, 0x00000000f9c00000, 0x00000000f9c00000)
	  eden space 81920K,  51% used [0x00000000f3800000, 0x00000000f60cce50, 0x00000000f8800000)
	  from space 10240K,   0% used [0x00000000f8800000, 0x00000000f8800000, 0x00000000f9200000)
	  to   space 10240K,   0% used [0x00000000f9200000, 0x00000000f9200000, 0x00000000f9c00000)
	 tenured generation   total 102400K, used 88659K [0x00000000f9c00000, 0x0000000100000000, 0x0000000100000000)
	   the space 102400K,  86% used [0x00000000f9c00000, 0x00000000ff294c50, 0x00000000ff294e00, 0x0000000100000000)
	 Metaspace       used 2544K, capacity 4486K, committed 4864K, reserved 1056768K
	  class space    used 271K, capacity 386K, committed 512K, reserved 1048576K
 */
